package com.sgb.kjwl.model.entity;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

public class BannerEntity implements Serializable {
    private String imgUrl;  //banner图片地址
    @SerializedName(value = "bannerImg", alternate = {"image","banner_img","banner_image"})
    private String bannerImg;
    @SerializedName("url")
    private String url;
    @SerializedName("name")
    private String name;
    @SerializedName("id")
    private String id;

    public BannerEntity(String id, String name) {
        this.name = name;
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBannerImg() {
        return bannerImg;
    }

    public void setBannerImg(String bannerImg) {
        this.bannerImg = bannerImg;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getImgUrl() {
        if (bannerImg != null) {
            return bannerImg;
        } else if (url != null) {
            return url;
        }
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
